<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/dynamic_option.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/dynamic_option.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'dynamic_option_id',
                footer: "Foots",
                cnName: '动态选项配置',
                name: 'jrtable/dynamic_option',
                url: "/dynamic_option/",
                sortName: "zj_bm"
            });
            const editFormFields = ref({"zc_bm":"","zj_bm":"","pz_bl":"","zj_bm_zh":"","expression":"","expression_zh":"","dynamic_express":""});
            const editFormOptions = ref([[{"title":"整车编码","field":"zc_bm"},
                               {"title":"组件编码","field":"zj_bm"},
                               {"title":"配置变量","field":"pz_bl"},
                               {"title":"组件名称","field":"zj_bm_zh"}],
                              [{"title":"逻辑表达式","field":"expression","colSize":12}],
                              [{"title":"逻辑表达式(中文)","field":"expression_zh","colSize":12}],
                              [{"title":"动态属性","field":"dynamic_express","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'dynamic_option_id',title:'动态选项表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'zc_bm',title:'整车编码',type:'string',width:220,align:'left',sort:true},
                       {field:'zj_bm',title:'组件编码',type:'string',link:true,width:220,align:'left'},
                       {field:'pz_bl',title:'配置变量',type:'string',width:220,align:'left'},
                       {field:'zj_bm_zh',title:'组件名称',type:'string',width:220,align:'left'},
                       {field:'expression',title:'逻辑表达式',type:'string',width:220,align:'left'},
                       {field:'expression_zh',title:'逻辑表达式(中文)',type:'string',width:220,align:'left'},
                       {field:'dynamic_express',title:'动态属性',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
